<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

return [
    'default' => [
        'host' => env('AMQP_HOST'),
        'port' => (int)env('AMQP_PORT'),
        'user' => env('AMQP_USER'),
        'password' => env('AMQP_PASSWORD'),
        'vhost' => '/',
        'concurrent' => [
            'limit' => 1,
        ],
        'pool' => [
            'min_connections'   => 1,
            'max_connections'   => (int)(env('MQ_MAX_CONNECTIONS',20)),
            'connect_timeout'   => (float)(env('MQ_CONNECT_TIMEOUT',3.0)),
            'wait_timeout'      => (float)(env('MQ_WAIT_TIMEOUT',6.0)),
            'heartbeat'         => 3,
        ],
        'params' => [
            'insist'                => true,
            'login_method'          => 'AMQPLAIN',
            'login_response'        => null,
            'locale'                => 'en_US',
            'connection_timeout'    => 60.0,
            'read_write_timeout'    => 120.0,
            'keepalive'             => false,
            'context'               => null,
            'heartbeat'             => 60,
            'close_on_destruct'     => true,
        ],
    ],
    'pool2' => [
    ]
];
